﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class DownloadModel
    {
        public int Id { get; set; }
        public string FileName { get; set; }
        public Nullable<int> CountDownload { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public Nullable<bool> Status { get; set; }
        public string UrlFile { get; set; }

        public static void MapFrom(DownloadModel model, ref Download entity)
        {
            entity.Id = model.Id;
            entity.FileName = model.FileName;
            entity.CountDownload = model.CountDownload;
            entity.DateCreate = model.DateCreate;
            entity.Status = model.Status;
            entity.UrlFile = model.UrlFile;
        }

        public static void MapFrom(Download entity, ref DownloadModel model)
        {
            model.Id = entity.Id;
            model.FileName = entity.FileName;
            model.CountDownload = entity.CountDownload;
            model.DateCreate = entity.DateCreate;
            model.Status = entity.Status;
            model.UrlFile = entity.UrlFile;
        }

    }
}